#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
const int maxn = 1e5+10;
const int mod = 1e9+7;
const int INF = 0x3f3f3f3f;
int d[4][2]={1,0,0,1,-1,0,0,-1};
ll poww(ll x,ll y){
    ll ans=1;
    while(y){
        if(y&1) ans*=x;
        x*=x;
        y>>=1;
    }
    return ans;
}
int main() {
    ios::sync_with_stdio(0);
    #ifdef Uncle_drew
    // freopen("in.txt","r",stdin);
    // freopen("out.txt","w",stdout);
    #else
    #endif
    map<ll,pair<int,int>> ma;
    for(ll i=-500;i<=500;i++){
        for(ll j=-500;j<=500;j++){
            ll mid=poww(i,5)-poww(j,5);
            ma[mid]=mp(i,j);
        }
    }
    ll x;
    cin>>x;
    cout<<ma[x].first<<" "<<ma[x].second<<endl;
    return 0;
}